#include "StdAfx.h"
#include "MyStatic.h"


MyStatic::MyStatic(void)
{
}


MyStatic::~MyStatic(void)
{
}


HWND MyStatic::createStatic(LPCWSTR text,int styles,int x, int y, int cx,int cy, HWND hParent, int id ,
	int nHeight,int fnWeight , BOOL fdwItalic , BOOL fdwUnderline, LPTSTR font, HINSTANCE hInst)
{
	InitCommonControls();

	hInstance = hInst;
	hStatic = CreateWindow(TEXT("STATIC"),  text, styles, x, y, cx, cy, hParent, (HMENU) id, hInst, NULL); 

	HFONT hFont = CreateFont(nHeight,0,0,0,fnWeight,fdwItalic,fdwUnderline,0,VIETNAMESE_CHARSET,OUT_DEFAULT_PRECIS,
		CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, VARIABLE_PITCH,font);

	SendMessage(hStatic,WM_SETFONT,(WPARAM)hFont, 0);

	return hStatic;
}


void MyStatic::setText (LPWSTR text)
{
	SetWindowText(hStatic,text);
}
HWND MyStatic::getHandle()
{
	return hStatic;
}
